<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改')"/>
</head>
<body>
<form class="layui-form" action=""  th:object="${ApplyAlter}" >
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
<!--                <input readonly  type="text" id="index" name="index" class="layui-input">-->

                <h4 align="center" style="font-size: medium">请选择变更的项目</h4><br>
				<div class="layui-input-inline" th:each="applyProject,applyProjectStat:${applyProjectList}">
					<input type="radio" lay-filter="applyProjectList" id="applyProjectList" name="applyProjectList"
						   th:value="${applyProject.id}" th:title="${applyProject.proName}">
					<!--                <input type="text" id="applyProjectStat" class="layui-hide" th:value="${applyProjectStat.index}">-->
				</div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button id="select" type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit=""
                    lay-filter="applyAlter-update">
                <i class="layui-icon layui-icon-ok"></i>
				确定
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
				重置
            </button>
        </div>
    </div>
</form>

<script>
    function closeSelf(){
        parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
        parent.layui.table.reload("applyProject-table");
    }
</script>



<th:block th:include="include :: footer"/>
<script>
    layui.use(['form','laydate','jquery'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        let MODULE_PATH = rootPath+"/ApplyAlterController";


        $("#select").click(function() {
            // var proId = $("input[name='applyProjectList']:checked").val();
            // var p = $("#index").val();
            // layer.full(p);

            window.open(rootPath + "/ApplyAlterController" + '/add/' + $("input[name='applyProjectList']:checked").val(), '_parent', 'fullscreen=yes,resizable=yes')

        })
        //      var index =layer.open({
        //         type: 2,
        //         content: MODULE_PATH + '/add/'+$("input[name='applyProjectList']:checked").val(),
        //     });
        //      layer.restore(index);
        // //
        // //     // parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
        // });


        // form.on('submit(applyAlter-update)', function (data) {
        // 	// let loader = layer.load();
        //     // var proId = $("input[name='applyProjectList']:checked").val();
        //
        //
        //     $.ajax({
        //         url: MODULE_PATH+'/add/'+$("input[name='applyProjectList']:checked").val(),
        //         data: data.field,
        //         dataType: 'json',
        //         contentType: 'application/x-www-form-urlencoded',
        //         type: 'get',
        //         // yes: function (index){
        //         // layer.close(i);
        //         // success: function (result) {
        //         //     layer.close(loader);
        //         // }
        //     })
        //     return false;
        // });
    })
</script>
</body>
</html>